In a distributed storage system, a distributed hash table (DHT) is generally used to determine a storage position of data. That is, a Hash value is calculated by using a hash function, and data is mapped to Hash space according to the Hash value, where the Hash space is a ring connected head-to-tail. A Hash ring may be divided into several equal parts, each part is referred to as a partition, and the partitions are equally distributed to physical nodes. In addition, a mapping relationship between data and a partition is established and a mapping relationship between a partition and a physical node is established and stored in the DHT. Data read and write, capacity expansion of a distributed cluster, troubleshooting, and the like all depend on a change of the DHT. Therefore, the DHT needs to achieve an objective that load is even, reliability is good, a storage manner of data on a node facilitates data migration, and expansibility is good (that is, capacity expansion may be performed for multiple times for a system).
In the prior art, system capacity expansion may be implemented by adding a new physical node in the distributed storage system, that is, by increasing a quantity of physical nodes. A specific capacity expansion method may include: adding a new physical node into the system moving a partition that is in an original physical node to the new physical node, to perform and capacity expansion of the distributed storage system. Quantities of partitions in physical nodes are roughly the same.
During a process of implementing the foregoing system capacity expansion, the prior art has at least the following problems: if capacity expansion is performed for the distributed storage system for multiple times, a quantity of partitions in a physical node is decreasing, and the system capacity expansion is affected (for example, when there are only four partitions in each physical node, a capacity of the system can only be expanded to a maximum of four times an original capacity), which causes poor expansibility of the distributed storage system.